import service from "@/utils/request";
import type { Response, PageResponse } from "@/types/common";
import type { DevPageItem } from "@/types/pos/dev/index";
export const usePosDevicePageApi = (params: object) => {
  return service<any, Response<PageResponse<DevPageItem>>>({
    url: `/v1/pos/device/page`,
    method: "GET",
    params,
  });
};

export const usePosDeviceQueryApi = (params: object) => {
  return service<any, Response<DevPageItem>>({
    url: `/v1/pos/device/query`,
    method: "GET",
    params,
  });
};

export const usePosDeviceCreateApi = (data: object) => {
  return service({
    url: `/v1/pos/device/create`,
    method: "POST",
    data,
  });
};

export const usePosDeviceUpdateApi = (data: object) => {
  return service({
    url: `/v1/pos/device/update`,
    method: "POST",
    data,
  });
};

export const usePosDeviceDeleteApi = (data: object) => {
  return service({
    url: `/v1/pos/device/delete`,
    method: "DELETE",
    data,
  });
};
